package com.orangelife.service.paybill;

import java.util.List;
import java.util.Map;

import com.orangelife.exception.AppBizException;
import com.orangelife.service.paybill.modal.PayInfo;
import com.orangelife.service.paybill.modal.Paybill;
import com.orangelife.service.paybill.modal.PropFeePaybillDto;
import com.orangelife.service.property.model.UserBean;
import com.orangelife.webservice.service.paybill.entity.BillInfo;
import com.orangelife.webservice.service.paybill.entity.PayBillDto;
import com.orangelife.webservice.service.property.entity.PropComputeBean;

public interface IPayBillService {

	public int _offlineBill(PayBillDto payBillDto) throws AppBizException;

	public int updatePayBill(Paybill paybill) throws AppBizException;

	public int updatePayBill2(Paybill paybill) throws AppBizException;

	public int addPayBill(Paybill paybill) throws AppBizException;

	public List<Map<String, Object>> getPayBill(Map<String, Object> param)
			throws AppBizException;

	public Paybill getPayBillDetail(String paybillID) throws AppBizException;
	public Paybill getPayBillDetailByOrderID(String orderID) throws AppBizException;
	public Map<String, Object> getPayBillDetailHasApInfo(String paybillID)
			throws AppBizException;

	public boolean checkFeeDetailIsPay(String apartmentID, List<String> feeDetailIDs)
			throws AppBizException;

	public Map<String, Object> crePayBill(PropComputeBean propComputeBean)
			throws AppBizException;

	public List<Map<String, Object>> getFeeDetailsByIDs(String apartmentID,
			List<String> feeDetailIDs) throws AppBizException;

	public List<Map<String, Object>> getFeeDetailsByApartmentID(
			String apartmentID) throws AppBizException;

	public int setFeeDetailsPay(String apartmentID, List<String> feeDetailIDs)
			throws AppBizException;

	public List<Map<String, Object>> getFeeDetails(String commID,
			String apartmentID, String[] feeDetailIDs) throws AppBizException;

	public List<String> getPayBillDetailIDs(String PayBillID)
			throws AppBizException;

	public List<Map<String, Object>> getPayBillDetails(String PayBillID)
			throws AppBizException;

	// 检测并更新账单状态为已支付
	public int dealPayBill(PayInfo payInfo) throws AppBizException;

	/** 检测并更新账单状态为已支付线下 */
	public int dealPayBillOffline(PayBillDto payBillDto) throws AppBizException;

	public Map<String, Object> crePayBillBack(PayBillDto payBillDto)
			throws AppBizException;

	// /**
	// * 功能：计算所需支付金额
	// * @param request
	// * @param apartmentID
	// * @param commID
	// * @return
	// * @throws Exception
	// * */
	// public boolean checkMoneyIsValid(String money,String realMoney,String
	// subMoney);
	//
	// public List<String> addContact(String PayBillID) throws AppBizException;
	// public List<String> getPayBillDetailIDs(String PayBillID) throws
	// AppBizException;


	/***
	 * 线下删除账单
	 * 
	 * @param payBill
	 * @return
	 * @throws AppBizException
	 */
	public int  deletePayBillItem(String payBillID,UserBean userbean) throws AppBizException;
	/****
	 * 获取临时缴费账单
	 * 
	 * @param tsCreate
	 * @param search
	 * @param pageNo
	 * @param pageSize
	 * @return
	 * @throws AppBizException
	 */
	public List<Map<String, Object>> findPropFeePaybillByPage(
			Map<String, Object> map, int pageNo, int pageSize)
			throws AppBizException;

	/***
	 * 添加缴费临时金额
	 * 
	 * @param payBill
	 * @return
	 * @throws AppBizException
	 */
	public int addPropFeePaybill(BillInfo payBill) throws AppBizException;

	/**
	 * 用途 根据一张表内的所有ID查询propFeePaybill（橙子生活）(返回对象)
	 * 
	 * @author
	 * @date 创建时间 2016-08-03 15:14:36
	 * @param paybillID
	 *            (非必填字段)
	 * 
	 * @param commID
	 *            (非必填字段)
	 * 
	 * @param apartmentID
	 *            (非必填字段)
	 * 
	 * @param payType
	 *            (非必填字段)
	 * 
	 * @param payeeID
	 *            (非必填字段)
	 * 
	 * @param status
	 *            (非必填字段)
	 * 
	 * @param exceptionstatus
	 *            (非必填字段)
	 * 
	 * @param contactType
	 *            (非必填字段)
	 * 
	 * @param type
	 *            (非必填字段)
	 * 
	 * @param memID
	 *            (非必填字段)
	 * 
	 * @param billType
	 *            (非必填字段)
	 * 
	 * @param ruleID
	 *            (非必填字段)
	 * @return
	 * @throws AppBizException
	 */

	public List<PropFeePaybillDto> findPropFeePaybillByRelevantID(
			String paybillID, String commID, String apartmentID,
			String payType, String payeeID, String status,
			String exceptionstatus, String contactType, String type,
			String memID, String billType, String ruleID)
			throws AppBizException;
	

	/**
	 *计算预缴费用,并生成缴费项目
	 * 
	 * @author
	 * @date创建时间 2016-07-04 11:04:21
	 * @param propFeeMeter
	 * @return
	 * @throws AppBizException
	 */
	public Map<String,Object> _check( PayBillDto payBillDto) throws Exception;
}
